package personal.xjl._23java2studentdemo.mapper;

import org.apache.ibatis.annotations.*;
import personal.xjl._23java2studentdemo.model.Score;

import java.util.List;

@Mapper
public interface ScoreMapper {
    @Select("select * from score where student_id=#{studentId}")
    @Results({
            @Result(column = "course_id", property = "course", javaType = personal.xjl._23java2studentdemo.model.Course.class,
                    one = @One(select = "personal.xjl._23java2studentdemo.mapper.CourseMapper.selectById"))
    })
    List<Score> selectByStudentId(int studentId);
}
